package com.mzpai.board.enums;
/***
 * 看板分类： 
 * 	1,订单金额；
 * 	2.收现金额；
 * 	3.支付订单数；
 * 	4.全部订单；
 * 	5.未支付订单；
 * 	6.取消订单
 * @author Administrator
 *
 */
public enum CashKindEnum {
	
	CASH_KIND_1("1","订单金额"),
	CASH_KIND_2("2","收现金额"),
	CASH_KIND_3("3","支付订单数"),
	CASH_KIND_4("4","全部订单"),
	CASH_KIND_5("5","未支付订单"),
	CASH_KIND_6("6","取消订单");
	
	private String code;
	private String title;

	CashKindEnum(String code, String title) {
		this.code = code;
		this.title = title;
	}

	public String getCode() {
		return code;
	}

	public String getTitle() {
		return title;
	}

	public static String getTitle(String code) {
		for (CashKindEnum obj : CashKindEnum.values()) {
			if (obj.getCode().equals(code)) {
				return obj.title;
			}
		}
		return null;
	}
	
	public static CashKindEnum getType(String dataTypeCode){
        for(CashKindEnum enums:CashKindEnum.values()){
            if(enums.code.equals(dataTypeCode)){
                return enums;
            }
        }
        return null;
    }

}
